/**
 * 
 */
package com.csu.common.vo;


import com.csu.common.constants.SystemCode;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;

/**
 * @description：用于封装返回给小机的结果（JSON数据）
 */
@ApiModel(description = "返回结果数据包")
public class ResultVo<T>
{
	@ApiModelProperty(value = "返回数据")
	private T data;
	
	@ApiModelProperty(value = "错误码")
	private String errorCode;
	
	@ApiModelProperty(value = "状态详细说明")
	private String errorInfo;
	
	public ResultVo()
	{
		this.data = null;
		
		this.errorCode = SystemCode.SUCCESS;	//默认为请求成功！
		
		this.errorInfo = "操作成功！";
	}

	/**
	 * @return the data
	 */
	public T getData()
	{
		return data;
	}

	/**
	 * @param data the data to set
	 */
	public void setData(T data)
	{
		this.data = data;
	}

	/**
	 * @return the errorCode
	 */
	public String getErrorCode()
	{
		return errorCode;
	}

	/**
	 * @param errorCode the errorCode to set
	 */
	public void setErrorCode(String errorCode)
	{
		this.errorCode = errorCode;
	}

	/**
	 * @return the errorInfo
	 */
	public String getErrorInfo()
	{
		return errorInfo;
	}

	/**
	 * @param errorInfo the errorInfo to set
	 */
	public void setErrorInfo(String errorInfo)
	{
		this.errorInfo = errorInfo;
	}
}
